using System;
using System.Collections.Generic;
using System.Text;
using MindFactorial.LaunchPoint.Common;

namespace MindFactorial.LaunchPoint.Runtime
{
    /// <summary>
    /// Represents a collection of Business Rule Object in the LaunchPoint Server
    /// </summary>
    public class BRERuleCollection : RuntimeObject
    {
        LaunchPointApplication _runnable = null;
        /// <summary>
        /// Specifies the runnable component for the LaunchPoint Server
        /// </summary>
        /// <param name="runnable"></param>
        internal BRERuleCollection(LaunchPointApplication runnable)
        {

            this._runnable = runnable;
        }

        /// <summary>
        /// Gets the rules specified given the Adapter ID and Rule ID
        /// </summary>
        /// <param name="adapterid"> Adapter ID</param>
        /// <param name="ruleid">Rule ID</param>
        /// <returns></returns>
        public BRERule this[string adapterid, string ruleid]
        {
            get
            {                
                BRERule rule = new BRERule(adapterid, ruleid, _runnable);                
                return rule;                
            }
        }

    }
}
